Close ProcessOutputStream in Runtime::eval_php_code_in_subprocess#265
Merged
ashfame merged 1 commit intoWordPress:trunkfrom May 7, 2026
Merged
Conversation
Contributor
Author
1 task
Contributor
Author
|
The |
fredrikekelund
added a commit
to Automattic/studio
that referenced
this pull request
May 7, 2026
## Related issues <!-- Link a related issue to this PR. If the PR does not immediately resolve the issue, for example, it requires a separate deployment to production, avoid using the "Fixes" keyword and use "Related to" instead. --> - Fixes RSM-2326 ## How AI was used in this PR <!-- Help reviewers understand what to look for and verify that you've reviewed the code yourself. --> Codex was used to help diagnose race condition issues in `collectDirectoryMetadata` and to fix an issue in `blueprints.phar` given error logs from a local Windows VM. I also used it to add the `native-php` E2E testing config for Buildkite. Claude was used to debug the persistently failing E2E tests and came up with the OPcache directory fix. ## Proposed Changes - Fix an OPcache configuration issue that was causing some E2E tests to fail on Windows. - Kill the PHP child processes spawned by `php-server-child.ts` on Windows, too. - Temporarily include a precompiled `blueprints.phar` with a bugfix needed to make `blueprints.test.ts` pass. This can be removed when WordPress/php-toolkit#265 has landed and there's a new php-toolkit release. I advise landing this PR first and reverting this change later. - Make `collectDirectoryMetadata` more robust against race conditions. ## Testing Instructions <!-- Add as many details as possible to help others reproduce the issue and test the fix. "Before / After" screenshots can also be very helpful when the change is visual. --> E2E tests should pass on both platforms. ## Pre-merge Checklist <!-- Complete applicable items on this checklist **before** merging into trunk. Inapplicable items can be left unchecked. Both the PR author and reviewer are responsible for ensuring the checklist is completed. --> - [ ] Have you checked for TypeScript, React or other console errors?
Member
|
@fredrikekelund Thanks for the fix! Re-running that failed CI job now made it green 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Codex helped me diagnose and fix this issue.
When running the following blueprint using php-cli on Windows, I ran into an error like this:
View blueprint
View logs
This PR explicitly closes the
ProcessOutputStreaminRuntime::eval_php_code_in_subprocessbefore returning. I've confirmed that this fixes the issue on my Windows VM.